﻿namespace PrearrangedChaos.AgileZen.Service
{
    internal class TextFilter : ITextFilter
    {
        private readonly string _filterName;

        internal TextFilter(string filterName)
        {
            this._filterName = filterName;
        }

        public ZenFilter Contains(string value)
        {
            return new ZenFilter(string.Format("{0}:\"{1}\"", this._filterName, value));
        }

        public ZenFilter NotContains(string value)
        {
            return new ZenFilter(string.Format("not({0}:\"{1}\")", this._filterName, value));
        }
    }
}